<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>订单管理 - 管理后台</title>
    <link rel="stylesheet" href="/static/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/css/public.css" media="all"/>
</head>
<body class="childrenBody">
<div class="layui-col-md12">
    <table id="productOrderList" lay-filter="productOrderList" class="layui-table"></table>
    <script type="text/html" id="productOrderImage">
        <img src="/{{ d.course_image }}" style="height:30px;"/>
    </script>
</div>
<script src="/static/layui.js"></script>
<script>
    layui.use(['element', 'jquery', 'layer', 'table', 'form'], function () {
        var element=layui.element,
            table = layui.table;
        layui.tableIns = table.render({
            elem: '#productOrderList',
            url: '{:url("user/userProductOrder",array("id"=>$_GET["id"]))}',
            cellMinWidth: 95,
            id: "productOrderListTable",
            cols: [[
                {field: 'transaction', title: '订单号', align: "center"},
                {field: 'product_name', title: '产品', width: 200, align: "center"},
                {field: 'product_image', templet: '#productOrderImage', title: '产品图片', width: 200, align: "center"},
                {field: 'product_price', title: '产品价格（元）', width: 150, align: "center"},
                {field: 'price', title: '订单价格（元）', width: 150, align: "center"},
                {field: 'create_time', title: '下单时间', width: 200, align: "center"},
                {
                    field: 'pay_time', title: '支付时间', width: 200, align: "center", templet: function (d) {
                        return d.status == 1 ?  d.pay_time : d.status == 2 ?  d.all_pay_time :'未支付';
                    }
                },
            ]]
        });
    });
</script>
</body>
</html>